﻿//*****************************************************************************
//** Project:PatternWell.PAC
//** Copyright 2011 PatternWell LLC
//** Revision History:
//** Version 1.0 - Initial Release
//*****************************************************************************

namespace PatternWell.PAC
{
    /// <summary>
    /// Interface that is implemented by resources that are managed by a controller.
    /// </summary>
    public interface IResource
    {
        /// <summary>
        /// Helper method that polls the resource to determine if it is in a state that it can safely be released.
        /// </summary>
        /// <returns>ReleaseInfo object that holds information if the resource can release, and if it cannot release why it cannot release.</returns>
        ReleaseInfo CanReleaseResources();

        /// <summary>
        /// Releases the resources managed by this resource.
        /// </summary>
        void ReleaseResources();
    }
}
